/*
 * Copyright (c) 2024. hallele, Inc All rights reserved.
 */

package cn.hallele.ms.usercenter.model.repository;

import cn.hallele.mc.sdk.usercenter.common.enums.TenantStatusEnum;
import cn.hallele.ms.usercenter.model.entity.TenantEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * hallele_ms_usercenter
 *
 * @author anle5
 * @since 2024/10/13 14:26
 */
public interface TenantRepository extends JpaRepository<TenantEntity, Integer>, JpaSpecificationExecutor<TenantEntity> {
    /**
     * 分页查询
     *
     * @param name   name
     * @param status status
     * @return 分页结果
     */
    List<TenantEntity> findByNameLikeAndStatus(String name, TenantStatusEnum status);
}
